package com.example.birdfriends.dao;

import com.example.birdfriends.pojo.bird.Bird;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BirdDao {
    public List<Bird> findBirdNamesAndImages(@Param("start") Long start, @Param("lineNum") Long lineNum);
    public Long countBirdsNumber();
    public Long findMyBirdNumber(@Param("authorId") Long authorId);
    public List<String> findBirdSections();
    public Bird findBirdByBid(@Param("bid") Long bid);
    public List<Bird> findBirdsByAuthorId(@Param("authorId") Long authorId, @Param("start") Long start, @Param("lineNum") Long lineNum);
    public int addBirdEntry(Bird bird);
    public List<Bird> findBirdByNameAndSection(@Param("birdname") String name, @Param("section") String section);
    public int updateBirdImagesByBid(Bird bird);
    public int deleteMyBirdEntry(@Param("bid") Long bid);
    public int updateBirdEntryByBid(Bird bird);
    public List<Bird> findBirdsBySection(@Param("section") String section, @Param("start") long start, @Param("linenumber") long linenumber);
    public List<Bird> findBirdsByBirdName(@Param("name") String name, @Param("start") long start, @Param("linenumber") long linenumber);
    public List<Bird> findBirdsBySectionAndBirdname(@Param("section") String section, @Param("name") String name, @Param("start") long start, @Param("linenumber") long linenumber);
    public int countBirdsBySection(@Param("section") String section);
    public int countBirdsByBirdName(@Param("name") String name);
    public int countBirdsBySectionAndBirdname(@Param("section") String section, @Param("name") String name);

}
